<template>
	<view>
		<button @click="goRsd()">刷新</button>
		<view v-for="index in 30">
			<view></view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		onPullDownRefresh() {
			console.log("onPullDownRefresh 开始刷新");
			//网络请求
			setTimeout(()=>{
				console.log("onPullDownRefresh 刷新成功");
				uni.onPullDownRefresh()
			},2000)
		},
		// onReachBottom() {
		// 	// 数据重新加载
		// }
		methods: {
			goRsd(){
				uni.startPullDownRefresh({
					success() {
						
					},
					fail() {
						
					},
					complete() {
						
					}
				})
			}
		}
	}
</script>

<style>
button{
	margin: 20rpx;
}
</style>
